import request from '@/utils/request'

/*
获取部门列表
@returns

*/
export function getDepartments() {
// 配置url method 参数 data parms
  return request({
    url: 'company/department'
  })
}
// 获取部门详情
export function getDepartmentDetail(id) {
  return request({
    url: `company/department/${id}`

  })
}

// 编辑部门
export function getModification(data) {
  return request({
    url: `company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 新增部门信息
export function addDeparTment(data) {
// 配置url method 参数 data parms
  return request({
    url: 'company/department',
    method: 'post',
    data

  })
}
// 删除部门

export function deleteData(id) {
// 配置url method 参数 data parms
  return request({
    url: `company/department/${id}`,
    method: 'delete'

  })
}
